#ifndef __SMSE_H
#define __SMSE_H

#define DLLIMPORT __declspec(dllimport)

// In reality these are pointers to classes
typedef UINT8* HSmseTag;
typedef UINT8* HSmseContext;


typedef void(*DebugOutputFcn)(const char*);

/*******************************************************************************************
The SMSE2K API is written in C++ using classes. To prevent incompatibility between versions
almost every core function below goes through the same class (see CSmseContext in smse2k.cpp)
*******************************************************************************************/

DLLIMPORT HSmseContext SMSE_NewContext();

DLLIMPORT void SMSE_Stats();
DLLIMPORT HSmseTag SMSE_LoadTags(char* fn);
DLLIMPORT int SMSE_SaveTags(char* fn);
DLLIMPORT char* SMSE_GetTagValue(HSmseTag tag, char* tagfield);
DLLIMPORT void  SMSE_SetTagValue(HSmseTag tag, char* tagfield, char* value);

DLLIMPORT void SMSE_SetOutput(HSmseContext ctx, int sr, int ch);
DLLIMPORT void SMSE_Close(HSmseContext ctx);
DLLIMPORT int SMSE_LoadFile(HSmseContext, char* fn);
DLLIMPORT int SMSE_BootDriver(HSmseContext, char* name);
DLLIMPORT int SMSE_Buffer(HSmseContext ctx, short* buf, int length);
DLLIMPORT void SMSE_SetTrack(HSmseContext ctx, UINT32 code);
#endif